<?php
class Pageley_Gateway_Database_MySql_ResultSet implements Pageley_Gateway_Database_ResultSet {
	private $result;
	private $currentRow = -1;

	public function __construct($result) {
		$this->result = $result;
	}

	public function hasNext() {
		return $this->currentRow < mysql_num_rows($this->result) - 1;
	}

	public function next() {
		$this->currentRow++;
	}

	public function get($identifier) {
		$value = @mysql_result($this->result, $this->currentRow, $identifier);
		return $value;
	}
}